# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnfnetlink
pkgver=1.0.1
pkgrel=2
pkgdesc="low-level library for netfilter related kernel/userspace communication"
url="http://www.netfilter.org/projects/libnfnetlink/"
arch="all"
license="GPL-2.0-only"
makedepends="linux-headers"
subpackages="$pkgname-dev"
source="https://www.netfilter.org/projects/libnfnetlink/files/libnfnetlink-$pkgver.tar.bz2
	musl-fix-includes.patch
	"

prepare() {
	cd "$builddir"
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}
sha512sums="2ec2cd389c04e21c8a02fb3f6d6f326fc33ca9589577f1739c23d883fe2ee9feaa16e83b6ed09063ad886432e49565dc3256277d035260aca5aab17954b46104  libnfnetlink-1.0.1.tar.bz2
fc452e2924fa4de66e104229bc05a663c253148fb1c0bd62e5454a907877ffb084ba6a04e38bf4ef71a4e58041f4a242001a8029aefbe97ccc00e3bfcb7bba41  musl-fix-includes.patch"
